#!/usr/bin/perl
#
#
while($line=<STDIN>) {
	chomp($line);
	if($line=~/^([0-9]+)$/) {
		$senNum = $1;	
		$sentence = "";
	}
	elsif($line=~/^\s*$/) {
		$sentence=~s/\s*$//g;
		print "$sentence\n";
	}
	else {
		@words = split(/[_\s]+/,$line);
		$sentence.=$words[2]." ";
	}
}
